<script type="text/javascript">
	startList = function()
	{
		navRoot = document.getElementById("nav");
		for (i=0; i<navRoot.childNodes.length; i++)
		{
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI"){
				node.onmouseover=function()
				{
					if (this.className=='selected'){
						this.oldClassName='selected';
					}
					this.className="allum selected";
				}
				node.onmouseout=function()
				{
					if (this.oldClassName!='selected'){
						this.className='rien';
					} else {
						this.className='selected';
					}
				}
			}
		}
	}
	window.onload=startList;
</script>

<ul id="nav">
    <?php foreach($array_menus as $pid=>$pmenu) {?>
    <li<?php if($section == $pmenu['parent']['SECTION']) { ?> class="selected"<?php } ?>>
		<a href="<? echo APPLICATION_URL.'/'.$pmenu['parent']['LINK'].'/'; ?>"><?php echo $pmenu['parent']['NAME']; ?></a>
        <?php if(count($pmenu['childs'])) {?>
        <?php $index = 0;?>
        <ul class="sub">
            <?php foreach($pmenu['childs'] as $cid=>$cmenu) {?>
            <?php $index++;?>
            <li><a href="<? echo APPLICATION_URL.'/'.$cmenu['child']['LINK'].'/'; ?>"><?php echo $cmenu['child']['NAME']; ?></a></li>
            <?php if($index < count($pmenu['childs'])) {?>
            <li class="separator"><div class="line"></div></li>
            <?php } ?>
            <?php } ?>
		</ul>
        <?php }?>
	</li>
	<?php } ?>
</ul>

<div class="menu-line">&nbsp;</div>
